import request from '@/utils/request'

// 查询Blog列表(分页)
export function listBlog(query) {
  return request({
    url:'sysBlog/list',
    method:'get',
    params: query
  })
}
// 根据ID查询blog
export function getByIdBlog(id) {
  return request({
    url: 'sysBlog/selectFindById/' + id,
    method: 'get',
  })
}
// 新增blog
export function addBlog(data) {
  return request({
    url: 'sysBlog/addBlog',
    method: 'post',
    data: data
  })
}
// 修改blog
export function updateBlog(data) {
  return request({
    url: 'sysBlog/updateBlog',
    method: 'post',
    data: data
  })
}
// 删除blog
export function deleteBlog(id) {
  return request({
    url: 'sysBlog/deleteBlog/' + id,
    method: 'get',
  })
}
// 查询已删除博客列表
export function deleteBlogList() {
  return request({
    url:'sysBlog/deleteBlogList',
    method:'get'
  })
}
// 彻底删除blog
export function completelyDelete(id) {
  return request({
    url: 'sysBlog/completelyDelete/' + id,
    method: 'get',
  })
}
// 还原
export  function recoveryBlog(id) {
  return request({
    url: 'sysBlog/recovery/' + id,
    method: 'get'
  })
}
